home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- organization: Megatest Corporation, San Jose, Ca
- keywords: spell spellin spellout hlista stopa
- subject: v10i080: enhancements to Unix spell
- From: djones@uunet.uu.net@megatest.UUCP (Dave Jones)
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 10, Issue 80
- Submitted-by: djones@uunet.uu.net@megatest.UUCP (Dave Jones)
- Archive-name: enh-spell
-
- Unix comes with a 'spell' utility complete with a file of
- correctly spelled words, and a file of derived words which
- look plausible to the 'spell' program, but are not. But
- the lists are not as complete as one would like.
-
- Here are some routines for augmenting the released spelling lists,
- and using them with the spell-routine.
-
- Commands:
-
- learn_word ... Learn correct spelling of a word or words.
- bad_word ... Learn that a word which might be derived from
- spell's spelling rules is in fact misspelled.
- spell ... Like spell, but uses the augmented lists.
-
-
- I've also included 'words' and 'stop' files of words which have come
- up in my writing over the past few months. There's only one word in the
- stop-list: 'primative', which I suppose it derives as 'prima' + 'tive'.
- The correct spelling is 'primitive', which is in the standard list.
-
- The 'words' list has seventy-eight so far, some of which may not be suitable
- to all occasions.
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: README bad_word learn_word spell stop words
- # Wrapped by djones@goofy on Thu Feb 15 20:56:09 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f README -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"README\"
- else
- echo shar: Extracting \"README\" \(977 characters\)
- sed "s/^X//" >README <<'END_OF_README'
- XUnix comes with a 'spell' utility complete with a file of
- Xcorrectly spelled words, and a file of derived words which
- Xlook plausible to the 'spell' program, but are not. But
- Xthe lists are not as complete as one would like.
- X
- XHere are some routines for augmenting the released spelling lists,
- Xand using them with the spell-routine.
- X
- XCommands:
- X
- X learn_word ... Learn correct spelling of a word or words.
- X bad_word ... Learn that a word which might be derived from
- X spell's spelling rules is in fact misspelled.
- X spell ... Like spell, but uses the augmented lists.
- X
- X
- XI've also included 'words' and 'stop' files of words which have come
- Xup in my writing over the past few months. There's only one word in the
- Xstop-list: 'primative', which I suppose it derives as 'prima' + 'tive'.
- XThe correct spelling is 'primitive', which is in the standard list.
- X
- XThe 'words' list has seventy-eight so far, some of which may not be suitable
- Xto all occasions.
- END_OF_README
- if test 977 -ne `wc -c <README`; then
- echo shar: \"README\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f bad_word -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"bad_word\"
- else
- echo shar: Extracting \"bad_word\" \(791 characters\)
- sed "s/^X//" >bad_word <<'END_OF_bad_word'
- X#! /bin/csh -f
- X# Learn an incorrect spelling of a word or words. (Spellings which
- X# might be generated from general spelling rules. See man-page for 'spell'.)
- X#
- X# Creates and maintains files
- X# ~/lib/stop ... sorted text of words to suppliment standard stop-list
- X# ~/lib/hstop ... supplimental and standard lists, merged and hashed
- X# ~/lib/stop.temp ... scratch file
- X# ~/lib/hstop.temp ... scratch file
- X#
- X# I don't know why I need to make a copy of /usr/dict/hstop, but
- X# that's the only way I found to make it work. .. djones
- X
- X# See also learn_word
- X
- Xecho $* | tr ' ' '\012' >> ~/lib/stop
- Xsort -u ~/lib/stop > ~/lib/stop.temp
- Xmv ~/lib/stop.temp ~/lib/stop
- Xcp /usr/dict/hstop ~/lib/hstop.temp
- X/usr/bin/spellin ~/lib/hstop.temp < ~/lib/stop > ~/lib/hstop
- Xrm ~/lib/hstop.temp
- END_OF_bad_word
- if test 791 -ne `wc -c <bad_word`; then
- echo shar: \"bad_word\" unpacked with wrong size!
- fi
- chmod +x bad_word
- # end of overwriting check
- fi
- if test -f learn_word -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"learn_word\"
- else
- echo shar: Extracting \"learn_word\" \(701 characters\)
- sed "s/^X//" >learn_word <<'END_OF_learn_word'
- X#! /bin/csh -f
- X# Learn the correct spelling of a word or words.
- X# Creates and maintains files
- X# ~/lib/words ... sorted text of words to suppliment standard list
- X# ~/lib/hlista ... supplimental and standard lists, merged and hashed
- X# ~/lib/words.temp ... scratch file
- X# ~/lib/hlista.temp ... scratch file
- X#
- X# I don't know why I need to make a copy of /usr/dict/hlista, but
- X# that's the only way I found to make it work. .. djones
- X
- X# See also bad_word
- X
- Xecho $* | tr ' ' '\012' >> ~/lib/words
- Xsort -u ~/lib/words > ~/lib/words.temp
- Xmv ~/lib/words.temp ~/lib/words
- Xcp /usr/dict/hlista ~/lib/hlista.temp
- X/usr/bin/spellin ~/lib/hlista.temp < ~/lib/words > ~/lib/hlista
- Xrm ~/lib/hlista.temp
- END_OF_learn_word
- if test 701 -ne `wc -c <learn_word`; then
- echo shar: \"learn_word\" unpacked with wrong size!
- fi
- chmod +x learn_word
- # end of overwriting check
- fi
- if test -f spell -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"spell\"
- else
- echo shar: Extracting \"spell\" \(65 characters\)
- sed "s/^X//" >spell <<'END_OF_spell'
- X#! /bin/csh -f
- X
- X/usr/bin/spell -d ~/lib/hlista -s ~/lib/hstop $*
- END_OF_spell
- if test 65 -ne `wc -c <spell`; then
- echo shar: \"spell\" unpacked with wrong size!
- fi
- chmod +x spell
- # end of overwriting check
- fi
- if test -f stop -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"stop\"
- else
- echo shar: Extracting \"stop\" \(10 characters\)
- sed "s/^X//" >stop <<'END_OF_stop'
- Xprimative
- END_OF_stop
- if test 10 -ne `wc -c <stop`; then
- echo shar: \"stop\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f words -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"words\"
- else
- echo shar: Extracting \"words\" \(722 characters\)
- sed "s/^X//" >words <<'END_OF_words'
- XEuropean
- XMegatest
- XMidwestern
- Xabsurdum
- Xaccusatory
- Xafoul
- Xastrology
- Xaustralopithecine
- Xawestricken
- Xawestruck
- Xbaloney
- Xchimp
- Xclamor
- Xcombo
- Xdecimate
- Xdefamation
- Xdetritus
- Xdiminuendo
- Xdoggerel
- Xdoily
- Xemblem
- Xemote
- Xendorphin
- Xerstwhile
- Xeuphony
- Xgonorrhea
- Xgoodbye
- Xheadstrong
- Xhomey
- Xhominem
- Xhominid
- Xhomophone
- Xhorrific
- Ximpanel
- Xinnocuous
- Xinstantiate
- Xjackal
- Xkeystroke
- Xmillion
- Xmitochondria
- Xmitochondrial
- Xmitochondrion
- Xnauseous
- Xnecrophilia
- Xobtuse
- Xpabulum
- Xpeccadillo
- Xpentatonic
- Xperitoneal
- Xphlegm
- Xpiney
- Xpiscine
- Xpittance
- Xpolymorhism
- Xpontificate
- Xpontification
- Xpontificator
- Xpostdict
- Xprevaricate
- Xpreventative
- Xprofundo
- Xprogram
- Xprolog
- Xreductio
- Xsatchel
- Xsavanna
- Xsavannah
- Xshit
- Xsmelly
- Xstrident
- Xtimorous
- Xtinnitus
- Xtrichotomy
- Xvapid
- Xyankee
- Xyoghurt
- Xyogurt
- Xzetetic
- END_OF_words
- if test 722 -ne `wc -c <words`; then
- echo shar: \"words\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- echo shar: End of shell archive.
- exit 0
-
-
-